package net.tensor.tensorprovider.database.controller;


import net.tensor.tensorprovider.database.service.impl.OauthCodeServiceImpl;
import net.tensor.tensorprovider.exception.ResultBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2020-10-19
 */
@RestController
@RequestMapping("/oauth-code")
public class OauthCodeController {
    @Autowired
    private OauthCodeServiceImpl oauthCodeService;

    @GetMapping
    public ResultBody oauthCodeList(){
        ResultBody resultBody=new ResultBody();
        resultBody.setCode("200");
        resultBody.setMessage("成功");
        resultBody.setResult(oauthCodeService.list());
        return resultBody;
    }
}
